prolog './g030.ijs'
NB. _ -------------------------------------------------------------------

eq =. -:&((_8+#3!:1]0.5)&}.)&(3!:1)&,

(1 0 1 0,:0 1 0 1) -: = _ __ _ __
1 0 0 1 -: _ _ __ __ = _ __ _ __
*./, 0= _  = ?2 3$2
*./, 0= _  = _1e9+?2 3 4$2e9
*./, 0= _  = o._1e9+?2 3 4$2e9
*./, 0= _  = j./_1e9+?2 3 4$2e9
*./, 0= __ = ?2 3$2
*./, 0= __ = _1e9+?2 3 4$2e9
*./, 0= __ = o._1e9+?2 3 4$2e9
*./, 0= __ = r./_1e7+?2 3 4$2e7

_  -: ><_
__ -: ><__
0 0 1 0 -: _ _ __ __ < _ __ _ __
*./, 0= _ < ?2 3$2
*./, 0= _ < _1e9+?2 3 4$2e9
*./, 0= _ < o._1e9+?2 3 4$2e9
*./,   __ < ?2 3$2
*./,   __ < _1e9+?2 3 4$2e9
*./,   __ < o._1e9+?2 3 4$2e9
*./,    _ <~ ?2 3$2
*./,    _ <~ _1e9+?2 3 4$2e9
*./,    _ <~ o._1e9+?2 3 4$2e9
*./, 0=__ <~ ?2 3$2
*./, 0=__ <~ _1e9+?2 3 4$2e9
*./, 0=__ <~ o._1e9+?2 3 4$2e9

_ __ -: <._ __
_ __ __ __ -: _ _ __ __ <. _ __ _ __
t  -: _  <. t=.?2 3$2
t  -: _  <. t=._1e9+?2 3 4$2e9
t  -: _  <. t=.o._1e9+?2 3 4$2e9
(($t)$__) -: __ <. t=.?2 3$2
(($t)$__) -: __ <. t=._1e9+?2 3 4$2e9
(($t)$__) -: __ <. t=.o._1e9+?2 3 4$2e9
_  -: <./''

_ __ -: <: _ __
1 0 1 1 -: _ _ __ __ <: _ __ _ __
*./, 0= _ <: ?2 3$2
*./, 0= _ <: _1e9+?2 3 4$2e9
*./, 0= _ <: o._1e9+?2 3 4$2e9
*./,   __ <: ?2 3$2
*./,   __ <: _1e9+?2 3 4$2e9
*./,   __ <: o._1e9+?2 3 4$2e9
*./,    _ <:~ ?2 3$2
*./,    _ <:~ _1e9+?2 3 4$2e9
*./,    _ <:~ o._1e9+?2 3 4$2e9
*./, 0=__ <:~ ?2 3$2
*./, 0=__ <:~ _1e9+?2 3 4$2e9
*./, 0=__ <:~ o._1e9+?2 3 4$2e9

_ __ -: > _ __
_ __ -: > _;__
0 1 0 0 -: _ _ __ __ > _ __ _ __
*./,    _ > ?2 3$2
*./,    _ > _1e9+?2 3 4$2e9
*./,    _ > o._1e9+?2 3 4$2e9
*./, 0=__ > ?2 3$2
*./, 0=__ > _1e9+?2 3 4$2e9
*./, 0=__ > o._1e9+?2 3 4$2e9
*./, 0= _ >~ ?2 3$2
*./, 0= _ >~ _1e9+?2 3 4$2e9
*./, 0= _ >~ o._1e9+?2 3 4$2e9
*./,   __ >~ ?2 3$2
*./,   __ >~ _1e9+?2 3 4$2e9
*./,   __ >~ o._1e9+?2 3 4$2e9

_ __ -: >._ __
_ _ _ __ -: _ _ __ __ >. _ __ _ __
(($t)$_) -: _ >. t=.?2 3$2
(($t)$_) -: _ >. t=._1e9+?2 3 4$2e9
(($t)$_) -: _ >. t=.o._1e9+?2 3 4$2e9
t  -: __ >. t=.?2 3$2
t  -: __ >. t=._1e9+?2 3 4$2e9
t  -: __ >. t=.o._1e9+?2 3 4$2e9
__ -: >./''

_ __ -: >: _ __
1 1 0 1 -: _ _ __ __ >: _ __ _ __
*./,    _ >: ?2 3$2
*./,    _ >: _1e9+?2 3 4$2e9
*./,    _ >: o._1e9+?2 3 4$2e9
*./, 0=__ >: ?2 3$2
*./, 0=__ >: _1e9+?2 3 4$2e9
*./, 0=__ >: o._1e9+?2 3 4$2e9
*./, 0= _ >:~ ?2 3$2
*./, 0= _ >:~ _1e9+?2 3 4$2e9
*./, 0= _ >:~ o._1e9+?2 3 4$2e9
*./,   __ >:~ ?2 3$2
*./,   __ >:~ _1e9+?2 3 4$2e9
*./,   __ >:~ o._1e9+?2 3 4$2e9

_ __ eq + _ __
_ __ eq _ __ + _ __

'NaN error' -: _  + etx __
'NaN error' -: __ + etx _

*./, _  = _  + ?2 3$2
*./, _  = _  + _1e9+?2 3 4$2e9
*./, _  = _  + o._1e9+?2 3 4$2e9
*./, _  = _  + }.0j1,o._1e9+?12$2e9
*./, __ = __ + ?2 3$2
*./, __ = __ + _1e9+?2 3 4$2e9
*./, __ = __ + o._1e9+?2 3 4$2e9
*./, __ = __ + }.0j1,o._1e9+?12$2e9

(_ __,.0 0) -: +. _ __
NB. _ _ _ _ -: _ _ __ __ +. _ __ _ __
NB. *./, _ = _  +. ?2 3$2
NB. *./, _ = _  +. _1e9+?2 3 4$2e9
NB. *./, _ = _  +. o._1e9+?2 3 4$2e9
NB. *./, _ = _  +. j./_1e9+?2 3 4$2e9
NB. *./, _ = __ +. ?2 3$2
NB. *./, _ = __ +. _1e9+?2 3 4$2e9
NB. *./, _ = __ +. o._1e9+?2 3 4$2e9
NB. *./, _ = __ +. j./_1e9+?2 3 4$2e9

_ __ -: +: _ __

1 _1 -: * _ __
_ __ __ _ eq _ _ __ __ * _ __ _ __
(-~0.5 0.5) eq 0 * _ __
(-~0.5 0.5) eq _ __ * 0
(-~0.5) eq _  * 0
(-~0.5) eq _  * -~5
(-~0.5) eq _  * -~0.5
0       =  _  * -~0j5
(-~0.5) eq __ * 0
(-~0.5) eq __ * -~5
(-~0.5) eq __ * -~0.5
0       =  __ * -~0j5
((*a){0 _ __) eq _  * a=.?2 3$2
((*a){0 _ __) eq _  * a=._1e9+?2 3 4$2e9
((*a){0 _ __) eq _  * a=.o._1e9+?2 3 4$2e9
((*a){0 __ _) eq __ * a=.?2 3$2
((*a){0 __ _) eq __ * a=._1e9+?2 3 4$2e9
((*a){0 __ _) eq __ * a=.o._1e9+?2 3 4$2e9

NB. _ -: *. _
NB. _ad180 -: *. __
NB. _ar3.14159265358979 -: *. __
NB. _ __ __ _ -: _ _ __ __ *. _ __ _ __
NB. _. _. eq 0 *. _ __
NB. _. _. eq _ __ *. 0

'NaN error' -: _  *. etx a=.?2 3$2
'NaN error' -: _  *. etx a=._1e9+?2 3 4$2e9
'NaN error' -: _  *. etx a=.o._1e9+?2 3 4$2e9
'NaN error' -: __ *. etx a=.?2 3$2
'NaN error' -: __ *. etx a=._1e9+?2 3 4$2e9
'NaN error' -: __ *. etx a=.o._1e9+?2 3 4$2e9

-. 128!:5 (2 (0 0;0 1;1 0)} 6 6$0) *  1 (0 0;0 1;1 0)} 6 6$_   NB. used to leave NaNs at the end
-. 128!:5  (1 (0 0;0 1;1 0)} 6 6$_) * (2 (0 0;0 1;1 0)} 6 6$0)


_ _ -: *: _ __

__ _ -: - _ __

_ __  eq _ __ - __ _

'NaN error' -: _  - etx _
'NaN error' -: __ - etx __

*./, _  = _  - ?2 3$2
*./, _  = _  - _1e9+?2 3 4$2e9
*./, _  = _  - o._1e9+?2 3 4$2e9
*./, _  = _  - }.0j1,_1e9+?24$2e9
*./, __ = __ - ?2 3$2
*./, __ = __ - _1e9+?2 3 4$2e9
*./, __ = __ - o._1e9+?2 3 4$2e9
*./, __ = __ - }.0j1,_1e9+?24$2e9
*./, __ = _  -~ ?2 3$2
*./, __ = _  -~ _1e9+?2 3 4$2e9
*./, __ = _  -~ o._1e9+?2 3 4$2e9
*./, __ = _  -~ }.0j1,_1e9+?24$2e9
*./,  _ = __ -~ ?2 3$2
*./,  _ = __ -~ _1e9+?2 3 4$2e9
*./,  _ = __ -~ o._1e9+?2 3 4$2e9
*./,  _ = __ -~ }.0j1,_1e9+?24$2e9

__ _ -: -. _ __
'' -: _  -. _
'' -: __ -. __

!0

'' -: qq =: (qqq =: _ __) -. (qqqq =: __ _)
a -: (a,_ __) -. _ __ [ a=.?20$1e9
__ _ -: (__ _,a) -. a=.?20$1e9

_ __ eq -: _ __
_  -: _
__ -: __
0  -: _  -: __
0  -: _  -: ?2e9
0  -: __ -: -?2e9

0 0 -: % _ __
_   eq % 0
NB. _. _. _. _. eq _ _ __ __ % _ __ _ __
0 0 -: 0 % _ __
_ __ eq _ __ % 0
((*a){0 _ __)  eq (a=._1e9+?2 3 4$2e9) % 0
((*a){_ _ __)  eq _  % a=.?2 3$2
((*a){_ _ __)  eq _  % a=._1e9+?2 3 4$2e9
((*a){_ _ __)  eq _  % a=.o._1e9+?2 3 4$2e9
((*a){__ __ _) eq __ % a=.?2 3$2
((*a){__ __ _) eq __ % a=._1e9+?2 3 4$2e9
((*a){__ __ _) eq __ % a=.o._1e9+?2 3 4$2e9
(($a)$0) -: _  %~ a=.?2 3$2
(($a)$0) -: _  %~ a=._1e9+?2 3 4$2e9
(($a)$0) -: _  %~ a=.o._1e9+?2 3 4$2e9
(($a)$0) -: __ %~ a=.?2 3$2
(($a)$0) -: __ %~ a=._1e9+?2 3 4$2e9
(($a)$0) -: __ %~ a=.o._1e9+?2 3 4$2e9
           
_ -: %: _
NB. _ad180 -: %: __
NB. _ar3.14159265358979 -: %: __
1 1 1 1   -: _ _ __ __ %: _ __ _ __
1 1 1 1 1 -: _  %: _2 _1 0 1 2
1 1 1 1 1 -: __ %: _2 _1 0 1 2
(($a)$1) -: _  %: a=.?2 34$2
(($a)$1) -: _  %: a=._1e9+?2 34$2e9
(($a)$1) -: _  %: a=.o._1e9+?2 34$2e9
(($a)$1) -: _  %: a=.j./_1e9+?2 34$2e9
(($a)$1) -: __ %: a=.?2 34$2
(($a)$1) -: __ %: a=._1e9+?2 34$2e9
(($a)$1) -: __ %: a=.o._1e9+?2 34$2e9
(($a)$1) -: __ %: a=.j./_1e9+?2 34$2e9

_ 0 -: ^ _ __
NB. _ 0 _. _. -: _ _ __ __ ^ _ __ _ __

(,'_') -: ": _



4!:55 ;:'a eq t'
epilog''

